#!/usr/bin/env python
# coding=utf-8
# Filename : TimeTravel.py
# Created by iFantastic on 2017/7/26
# Description : https://www.kaggle.com/anokas/time-travel-eda

import numpy as np # linear algebra
import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)
import matplotlib.pyplot as plt

date_x = pd.read_pickle('date_x')
print(date_x)
date_x.plot(secondary_y='Frequency', figsize=(20, 10))
plt.show()

date_y = pd.read_pickle('date_y')
i = int(len(date_y) / 3)
date_y[:i].plot(secondary_y='Frequency', figsize=(20, 5), title='date_y Year 1')
date_y[i:2*i].plot(secondary_y='Frequency', figsize=(20, 5), title='date_y Year 2')
date_y[2*i:].plot(secondary_y='Frequency', figsize=(20, 5), title='date_y Year 3')